#!/usr/bin/perl

require './ietman-lib.pl';

my ($act);
&ReadParse();
my $newname = $in{'tgtstr'};
if(($newname =~ /[^a-zA-Z0-9.]/) || !($newname =~ /^[a-zA-Z0-9]/) || ($newname =~ /\.$/)){
	$err_msg = $text{'invalid_id'};
	goto ERROR_OUT;
}
open(FT, "/etc/ietd.conf");
my @iconf=<FT>;
close(FT);
$len=@iconf;
open(FTB, ">/sysvol/etc/ietd.conf");
print FTB "# ".$newname."\n";
for($i=1; $i<$len; $i++){
	print FTB $iconf[$i];
}
close(FTB);
&redirect("index.cgi");
ERROR_OUT:
&error_setup("");
&error($err_msg);


